$(document).ready(function()
{
    var url = location.href;
    var baseURL = url.substring(0, url.indexOf('/', 14));
    var fullURL = "";
    var directory = "";
    
    if (baseURL == 'http://localhost' || baseURL == 'http://3kdigitaldesigns.com')
    {
        directory = '/evd';
    }

    fullURL = baseURL + directory + '/auth/process_login';
    
    $(":submit").click(function ()
    {
        var login_form = $("#login_form").serialize();
        
        $.post(fullURL, { login_form: login_form },
        
            function(data)
            {
                if (data == 'success')
                {
                    window.location.replace(baseURL + directory);
                }
            }
        );

    });
});